package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetMealDishMapper {



    /**
     * 根据套餐id查询套餐id
     * @param ids
     * @return
     */
    List<Long> getSetMealDishByIds(List<Long> ids);

    /**
     * 插入套餐菜品
     * @param setmealDish
     */
    void insert(SetmealDish setmealDish);


    /**
     * 根据套餐id查询套餐菜品
     * @param id
     * @return
     */
    List<SetmealDish> getBySetmealId(Long id);

    /**
     * 根据套餐id删除套餐菜品
     * @param id
     */
    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void deleteBySetmealId(Long id);
}
